/********************
 * 节卡传感器接口
 * ******************/

#ifndef _LIBFORCESENSOR_H_
#define _LIBFORCESENSOR_H_

#include <string>

enum FORCESENSORTYPE
{
    ATI_UDP_1 = 1,
    KW_USB_2 = 2,
    YL_TCP_3 = 3,
    YL_TCP_4 = 4,
    KW_USB_5 = 5,
    YL_USB_7 = 7
};

class JAKASensor;

class ForceSensor
{
public:
    ForceSensor(FORCESENSORTYPE sensor_type, std::string ip, int port);
    ~ForceSensor();

    int InitSensor();                        // 打开传感器，并设置部分配置， 每个传感器都不一样
    void CloseSensor();                      // 关闭传感器，关闭文件操作符
    int GetSensorData(double* sensor_data);  // 获取传感器数据
    int SensorBrand();
    void setUSBDeviceName(std::string device);
    void setIp(std::string ip);
    void setPort(int port);

protected:
    JAKASensor* sensor_ptr_ = nullptr;
};

#endif